<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>抽奖</title>
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/common.css">
    <link rel="stylesheet" href="./css/lottery.css">
</head>
<body>
    <div id="lottery">
        <img src="./img/lottery/main_bg.jpg" alt="">
        <div class="logo"><img src="./img/logo.png" alt=""></div>
        <div class="redEnvelope"><img id="redImg" src="./img/lottery/red_bag.png" alt=""></div>
        <span>点击红包看看你会获得什么奖品吧</span>
        <div class="ball"><img src="./img/lottery/ball.png" alt=""></div>
    </div>

    <script src="./js/jquery-2.1.0.js"></script>
    <script>
        $(".redEnvelope").on("click",function(){
            $("#redImg").addClass("yaohuang");
        })
        $("#redImg").on("animationend",function(){
            $(".ball").css({"display":"block"});
            $(".ball").addClass("xuanzhuan");
        })
        $(".ball").on("animationend",function(){
            location.href = "./invite.html";
        })
    </script>
</body>
</html>